<?php
$dbHost = "localhost";
$dbUser = "root";
$dbPass = "M00nshine";
$dbDatabase = "jala_db";

//connect to the datbase

$db = mysql_connect("$dbHost", "$dbUser", "$dbPass") or die ("Error connecting to database.");

mysql_select_db("$dbDatabase", $db) or die ("Couldn't select the database.");


//  Need to check to see if soap caching is enabled, and remove if necessary
//  If this is enabled, it causes the wsdl file to be cached.  Thus changing the IP doesn't appear to work
ini_set('soap.wsdl_cache_enabled', '0');			
ini_set('soap.wsdl_cache_dir', '');
ini_set('soap.wsdl_cache_ttl', '0');

//TODO: Check to see if the session is idle for X amount of time.  If so, destroy the session and redirect to login
// page and state that you were disconnected because of a session timeout.

/*$MAX_IDLE_TIME = 60; //Number of seconds customer session can be idle;

if (!isset($_SESSION['timeout_idle'])) {
	$_SESSION['timeout_idle'] = time() + $MAX_IDLE_TIME;
} else {
	if ($_SESSION['timeout_idle'] < time()) {
		//Destroy the session
		header('Location: test.html');
	} else {
		$_SESSION['timeout_idle'] = time() + $MAX_IDLE_TIME;
	}	
}*/
?>
